package com.sgb.kjwl.model.entity.self;

import android.os.Parcel;
import android.os.Parcelable;

import com.google.gson.annotations.SerializedName;

/**
 * @author: 杨畔
 * @date: 2021/8/9 15:52
 * @Description: 承运发布实体类
 */
public class CarriagePushEntity implements Parcelable {

    private String id;
    private String no;
    private String carTypeNo;
    private String carLenNo;
    private String provinceNo;
    private String cityNo;
    private String districtNo;
    private String provinceName;
    private String cityName;
    private String districtName;
    private String destProvinceNo;
    private String destCityNo;
    private String destDistrictNo;
    private String destProvinceName;
    private String destCityName;
    private String destDistrictName;
    @SerializedName(value = "shipmentStartTime", alternate = {"shipmentTime"})
    private String shipmentStartTime;
    private String shipmentEndTime;
    private String freight;
    private String note;
    @SerializedName("contrcts")
    private String contacts;
    @SerializedName("contrctsNumber")
    private String contactsNumber;
    private String pushProvinceNo;
    private String pushCityNo;
    private String pushDistrictNo;
    private String pushProvinceName;
    private String pushCityName;
    private String pushDistrictName;
    //  @ApiModelProperty("装货半径 0代表不限 其他数字表示")
    private String radius;
    private String carNumber;
    private String rate;
    private String isDump;
    private String payType;
    private String heightHurdle;
    private String weight;
    private String detailAddress;
    private String invoice;
    private String invoiceNo;
    private int isTrue; //是否推送信息 1已推送 2未推送
    private Integer bargain;//是否议价
    //v1.4
    private double lng;//发货地坐标
    private double lat;//发货地坐标
    private String destDetailAddress;//目的地详细地址
    private double destLng;//目的地坐标
    private double destLat;//目的地坐标
    private int pattern;//承运发布模式 0 普通模式  1 竞价模式
    private int state;//状态 0 待下单/竞价中  1 已成交   2 已结束
    @SerializedName(value = "driverNo", alternate = {"carNo"})
    private String driverNo;//车辆编号
    private String EndTime;
    //2.0.4新增
    private boolean isInvoiceChanges;//税率发票要求是否变更
    private String carTypeName;//车型
    private String carLenName;//车长
    private String messageStatus;//
    private int freightUnit;
    private Integer carrierType;

   // @ApiModelProperty("公里数  商议时传入")
    private String kilometre;


  //  @ApiModelProperty("是否商议 1商议 0未勾选")
    private int discuss;
  //  @ApiModelProperty("运距要求")
    private String haulDistance;

    public String getKilometre() {
        return kilometre;
    }

    public void setKilometre(String kilometre) {
        this.kilometre = kilometre;
    }

    public int getDiscuss() {
        return discuss;
    }

    public void setDiscuss(int discuss) {
        this.discuss = discuss;
    }

    public String getHaulDistance() {
        return haulDistance;
    }

    public void setHaulDistance(String haulDistance) {
        this.haulDistance = haulDistance;
    }

    public CarriagePushEntity() {
    }

    protected CarriagePushEntity(Parcel in) {
        id = in.readString();
        no = in.readString();
        carTypeNo = in.readString();
        carLenNo = in.readString();
        provinceNo = in.readString();
        cityNo = in.readString();
        districtNo = in.readString();
        provinceName = in.readString();
        cityName = in.readString();
        districtName = in.readString();
        destProvinceNo = in.readString();
        destCityNo = in.readString();
        destDistrictNo = in.readString();
        destProvinceName = in.readString();
        destCityName = in.readString();
        destDistrictName = in.readString();
        shipmentStartTime = in.readString();
        shipmentEndTime = in.readString();
        freight = in.readString();
        note = in.readString();
        contacts = in.readString();
        contactsNumber = in.readString();
        pushProvinceNo = in.readString();
        pushCityNo = in.readString();
        pushDistrictNo = in.readString();
        pushProvinceName = in.readString();
        pushCityName = in.readString();
        pushDistrictName = in.readString();
        radius = in.readString();
        carNumber = in.readString();
        rate = in.readString();
        isDump = in.readString();
        payType = in.readString();
        heightHurdle = in.readString();
        weight = in.readString();
        detailAddress = in.readString();
        invoice = in.readString();
        invoiceNo = in.readString();
        isTrue = in.readInt();
        if (in.readByte() == 0) {
            bargain = null;
        } else {
            bargain = in.readInt();
        }
        lng = in.readDouble();
        lat = in.readDouble();
        destDetailAddress = in.readString();
        destLng = in.readDouble();
        destLat = in.readDouble();
        pattern = in.readInt();
        state = in.readInt();
        driverNo = in.readString();
        EndTime = in.readString();
        isInvoiceChanges = in.readByte() != 0;
        carTypeName = in.readString();
        carLenName = in.readString();
        messageStatus = in.readString();
        freightUnit = in.readInt();
        if (in.readByte() == 0) {
            carrierType = null;
        } else {
            carrierType = in.readInt();
        }
        kilometre=in.readString();
        discuss=in.readInt();
        haulDistance=in.readString();

    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeString(id);
        dest.writeString(no);
        dest.writeString(carTypeNo);
        dest.writeString(carLenNo);
        dest.writeString(provinceNo);
        dest.writeString(cityNo);
        dest.writeString(districtNo);
        dest.writeString(provinceName);
        dest.writeString(cityName);
        dest.writeString(districtName);
        dest.writeString(destProvinceNo);
        dest.writeString(destCityNo);
        dest.writeString(destDistrictNo);
        dest.writeString(destProvinceName);
        dest.writeString(destCityName);
        dest.writeString(destDistrictName);
        dest.writeString(shipmentStartTime);
        dest.writeString(shipmentEndTime);
        dest.writeString(freight);
        dest.writeString(note);
        dest.writeString(contacts);
        dest.writeString(contactsNumber);
        dest.writeString(pushProvinceNo);
        dest.writeString(pushCityNo);
        dest.writeString(pushDistrictNo);
        dest.writeString(pushProvinceName);
        dest.writeString(pushCityName);
        dest.writeString(pushDistrictName);
        dest.writeString(radius);
        dest.writeString(carNumber);
        dest.writeString(rate);
        dest.writeString(isDump);
        dest.writeString(payType);
        dest.writeString(heightHurdle);
        dest.writeString(weight);
        dest.writeString(detailAddress);
        dest.writeString(invoice);
        dest.writeString(invoiceNo);
        dest.writeInt(isTrue);
        if (bargain == null) {
            dest.writeByte((byte) 0);
        } else {
            dest.writeByte((byte) 1);
            dest.writeInt(bargain);
        }
        dest.writeDouble(lng);
        dest.writeDouble(lat);
        dest.writeString(destDetailAddress);
        dest.writeDouble(destLng);
        dest.writeDouble(destLat);
        dest.writeInt(pattern);
        dest.writeInt(state);
        dest.writeString(driverNo);
        dest.writeString(EndTime);
        dest.writeByte((byte) (isInvoiceChanges ? 1 : 0));
        dest.writeString(carTypeName);
        dest.writeString(carLenName);
        dest.writeString(messageStatus);
        dest.writeInt(freightUnit);
        if (carrierType == null) {
            dest.writeByte((byte) 0);
        } else {
            dest.writeByte((byte) 1);
            dest.writeInt(carrierType);
        }
        dest.writeString(kilometre);
        dest.writeInt(discuss);
        dest.writeString(haulDistance);

    }

    @Override
    public int describeContents() {
        return 0;
    }

    public static final Creator<CarriagePushEntity> CREATOR = new Creator<CarriagePushEntity>() {
        @Override
        public CarriagePushEntity createFromParcel(Parcel in) {
            return new CarriagePushEntity(in);
        }

        @Override
        public CarriagePushEntity[] newArray(int size) {
            return new CarriagePushEntity[size];
        }
    };

    public Integer getCarrierType() {
        return carrierType;
    }

    public void setCarrierType(Integer carrierType) {
        this.carrierType = carrierType;
    }

    public int getFreightUnit() {
        return freightUnit;
    }

    public String getFreightUnitWords() {
        switch (freightUnit) {
            case 1:
                return "/趟";
            case 2:
                return "/吨";
            case 3:
                return "/方";
        }
        return "/吨";
    }

    public void setFreightUnit(int freightUnit) {
        this.freightUnit = freightUnit;
    }

    public String getMessageStatus() {
        return messageStatus;
    }

    public void setMessageStatus(String messageStatus) {
        this.messageStatus = messageStatus;
    }

    public String getCarTypeName() {
        return carTypeName;
    }

    public void setCarTypeName(String carTypeName) {
        this.carTypeName = carTypeName;
    }

    public String getCarLenName() {
        return carLenName;
    }

    public void setCarLenName(String carLenName) {
        this.carLenName = carLenName;
    }

    public Integer getBargain() {
        return bargain;
    }

    public void setBargain(Integer bargain) {
        this.bargain = bargain;
    }

    public int getIsTrue() {
        return isTrue;
    }

    public void setIsTrue(int isTrue) {
        this.isTrue = isTrue;
    }

    public String getInvoice() {
        return invoice;
    }

    public void setInvoice(String invoice) {
        this.invoice = invoice;
    }

    public void setWeight(String weight) {
        this.weight = weight;
    }

    public String getInvoiceNo() {
        return invoiceNo;
    }

    public void setInvoiceNo(String invoiceNo) {
        this.invoiceNo = invoiceNo;
    }

    public String getShipmentStartTime() {
        return shipmentStartTime;
    }

    public void setShipmentStartTime(String shipmentStartTime) {
        this.shipmentStartTime = shipmentStartTime;
    }

    public String getShipmentEndTime() {
        return shipmentEndTime;
    }

    public void setShipmentEndTime(String shipmentEndTime) {
        this.shipmentEndTime = shipmentEndTime;
    }

    public String getDetailAddress() {
        return detailAddress;
    }

    public void setDetailAddress(String detailAddress) {
        this.detailAddress = detailAddress;
    }

    public boolean isInvoiceChanges() {
        return isInvoiceChanges;
    }

    public void setInvoiceChanges(boolean invoiceChanges) {
        isInvoiceChanges = invoiceChanges;
    }

    public double getLng() {
        return lng;
    }

    public void setLng(double lng) {
        this.lng = lng;
    }

    public double getLat() {
        return lat;
    }

    public void setLat(double lat) {
        this.lat = lat;
    }

    public String getDestDetailAddress() {
        return destDetailAddress;
    }

    public void setDestDetailAddress(String destDetailAddress) {
        this.destDetailAddress = destDetailAddress;
    }

    public double getDestLng() {
        return destLng;
    }

    public void setDestLng(double destLng) {
        this.destLng = destLng;
    }

    public double getDestLat() {
        return destLat;
    }

    public void setDestLat(double destLat) {
        this.destLat = destLat;
    }

    public int getPattern() {
        return pattern;
    }

    public void setPattern(int pattern) {
        this.pattern = pattern;
    }

    public int getState() {
        return state;
    }

    public void setState(int state) {
        this.state = state;
    }

    public String getDriverNo() {
        return driverNo;
    }

    public void setDriverNo(String driverNo) {
        this.driverNo = driverNo;
    }

    public String getEndTime() {
        return EndTime;
    }

    public void setEndTime(String endTime) {
        EndTime = endTime;
    }

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getCarTypeNo() {
        return carTypeNo;
    }

    public void setCarTypeNo(String carTypeNo) {
        this.carTypeNo = carTypeNo;
    }

    public String getCarLenNo() {
        return carLenNo;
    }

    public void setCarLenNo(String carLenNo) {
        this.carLenNo = carLenNo;
    }

    public String getProvinceNo() {
        return provinceNo;
    }

    public void setProvinceNo(String provinceNo) {
        this.provinceNo = provinceNo;
    }

    public String getCityNo() {
        return cityNo;
    }

    public void setCityNo(String cityNo) {
        this.cityNo = cityNo;
    }

    public String getDistrictNo() {
        return districtNo;
    }

    public void setDistrictNo(String districtNo) {
        this.districtNo = districtNo;
    }

    public String getProvinceName() {
        return provinceName;
    }

    public void setProvinceName(String provinceName) {
        this.provinceName = provinceName;
    }

    public String getCityName() {
        return cityName;
    }

    public void setCityName(String cityName) {
        this.cityName = cityName;
    }

    public String getDistrictName() {
        return districtName;
    }

    public void setDistrictName(String districtName) {
        this.districtName = districtName;
    }

    public String getDestProvinceNo() {
        return destProvinceNo;
    }

    public void setDestProvinceNo(String destProvinceNo) {
        this.destProvinceNo = destProvinceNo;
    }

    public String getDestCityNo() {
        return destCityNo;
    }

    public void setDestCityNo(String destCityNo) {
        this.destCityNo = destCityNo;
    }

    public String getDestDistrictNo() {
        return destDistrictNo;
    }

    public void setDestDistrictNo(String destDistrictNo) {
        this.destDistrictNo = destDistrictNo;
    }

    public String getDestProvinceName() {
        return destProvinceName;
    }

    public void setDestProvinceName(String destProvinceName) {
        this.destProvinceName = destProvinceName;
    }

    public String getDestCityName() {
        return destCityName;
    }

    public void setDestCityName(String destCityName) {
        this.destCityName = destCityName;
    }

    public String getDestDistrictName() {
        return destDistrictName;
    }

    public void setDestDistrictName(String destDistrictName) {
        this.destDistrictName = destDistrictName;
    }

    public String getFreight() {
        return freight;
    }

    public void setFreight(String freight) {
        this.freight = freight;
    }

    public String getNote() {
        return note;
    }

    public void setNote(String note) {
        this.note = note;
    }

    public String getContacts() {
        return contacts;
    }

    public void setContacts(String contacts) {
        this.contacts = contacts;
    }

    public String getContactsNumber() {
        return contactsNumber;
    }

    public void setContactsNumber(String contactsNumber) {
        this.contactsNumber = contactsNumber;
    }

    public String getPushProvinceNo() {
        return pushProvinceNo;
    }

    public void setPushProvinceNo(String pushProvinceNo) {
        this.pushProvinceNo = pushProvinceNo;
    }

    public String getPushCityNo() {
        return pushCityNo;
    }

    public void setPushCityNo(String pushCityNo) {
        this.pushCityNo = pushCityNo;
    }

    public String getPushDistrictNo() {
        return pushDistrictNo;
    }

    public void setPushDistrictNo(String pushDistrictNo) {
        this.pushDistrictNo = pushDistrictNo;
    }

    public String getPushProvinceName() {
        return pushProvinceName;
    }

    public void setPushProvinceName(String pushProvinceName) {
        this.pushProvinceName = pushProvinceName;
    }

    public String getPushCityName() {
        return pushCityName;
    }

    public void setPushCityName(String pushCityName) {
        this.pushCityName = pushCityName;
    }

    public String getPushDistrictName() {
        return pushDistrictName;
    }

    public void setPushDistrictName(String pushDistrictName) {
        this.pushDistrictName = pushDistrictName;
    }

    public String getRadius() {
        return radius;
    }

    public void setRadius(String radius) {
        this.radius = radius;
    }

    public String getCarNumber() {
        return carNumber;
    }

    public void setCarNumber(String carNumber) {
        this.carNumber = carNumber;
    }

    public String getRate() {
        return rate;
    }

    public void setRate(String rate) {
        this.rate = rate;
    }

    public String getIsDump() {
        return isDump;
    }

    public void setIsDump(String isDump) {
        this.isDump = isDump;
    }

    public String getPayType() {
        return payType;
    }

    public void setPayType(String payType) {
        this.payType = payType;
    }

    public String getHeightHurdle() {
        return heightHurdle;
    }

    public void setHeightHurdle(String heightHurdle) {
        this.heightHurdle = heightHurdle;
    }

    public String getWeight() {
        return weight;
    }

    public void setWight(String wight) {
        this.weight = wight;
    }

    public String getNo() {
        return no;
    }

    public void setNo(String no) {
        this.no = no;
    }
}
